<?php $tpl->addCSS('css/checkout_payment.css'); ?>

<h2><?php echo $heading_title; ?></h2>
<?php if ($error) { ?>
<div class="warning"><?php echo $error; ?></div> 
<?php } ?>
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
  <div id="payment">
    <div class="a"><?php echo $text_payment; ?></div>
    <div class="b">
      <table>
        <tr>
          <td width="50%" valign="top"><?php echo $text_payment_to; ?></td>
          <td valign="top" rowspan="2"><b><?php echo $text_payment_address; ?></b><br />
            <?php echo $address; ?></td>
        </tr>
        <tr>
          <td align="center" valign="top"><input class="button_change_address" type="button" value="<?php echo $button_change_address; ?>" onclick="location='<?php echo $change_address; ?>'" /></td>
        </tr>
      </table>
    </div>
    <?php if ($methods) { ?>
    <div class="c"><?php echo $text_payment_method; ?></div>
    <div class="d"><?php echo $text_payment_methods; ?>
      <table>
        <?php foreach ($methods as $method) { ?>
        <tr>
          <td class="i" colspan="2"><label for="<?php echo $method['id']; ?>">
            <?php if ($method['id'] == $default || !$default) { ?>
            <?php $default = $method['id']; ?>
            <input type="radio" name="payment" value="<?php echo $method['id']; ?>" id="<?php echo $method['id']; ?>" checked="checked" />
            <?php } else { ?>
            <input type="radio" name="payment" value="<?php echo $method['id']; ?>" id="<?php echo $method['id']; ?>" />
            <?php } ?>
            <?php echo $method['title']; ?></label></td>
        </tr>
        <?php } ?>
      </table>
    </div>
    <?php } ?>
    <div class="g"><?php echo $text_comments; ?></div>
    <div class="h">
      <textarea name="comment" cols="91" rows="8"><?php echo $comment; ?></textarea>
    </div>
  </div>
  <div class="buttons">
    <table>
      <tr>
        <td align="left"><input class="button_back" type="button" value="<?php echo $button_back; ?>" onclick="location='<?php echo $back; ?>'" /></td>
        <td align="right"><input class="button_continue" type="submit" value="<?php echo $button_continue; ?>" /></td>
      </tr>
    </table>
  </div>
</form>
